try {
    FileReader file = new FileReader("file.txt");
} catch (FileNotFoundException e) {
    System.out.println("File not found.");
}

try{
    // 假设这里有一些可能会导致 IOException 的代码
}catch(IOException ex){
    System.out.println("An I/O error occurred."12+ex.getMessage());
}